/*    */ package com.zimbra.cs.service.formatter;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.service.UserServletContext;
/*    */ import com.zimbra.cs.service.UserServletException;
/*    */ import java.io.IOException;
/*    */ import java.util.zip.GZIPInputStream;
/*    */ import java.util.zip.GZIPOutputStream;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class TgzFormatter
/*    */   extends TarFormatter
/*    */ {
/*    */   public String[] getDefaultMimeTypes()
/*    */   {
/* 30 */     return new String[] { "application/x-compressed-tar" };
/*    */   }
/*    */   
/*    */   public FormatterFactory.FormatType getType()
/*    */   {
/* 35 */     return FormatterFactory.FormatType.TGZ;
/*    */   }
/*    */   
/*    */   protected ArchiveFormatter.ArchiveInputStream getInputStream(UserServletContext context, String charset) throws IOException, ServiceException, UserServletException
/*    */   {
/* 40 */     return new TarArchiveInputStream(new GZIPInputStream(context.getRequestInputStream(-1L)), charset);
/*    */   }
/*    */   
/*    */   protected ArchiveFormatter.ArchiveOutputStream getOutputStream(UserServletContext context, String charset)
/*    */     throws IOException
/*    */   {
/* 46 */     return new TarArchiveOutputStream(new GZIPOutputStream(context.resp.getOutputStream()), charset);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/formatter/TgzFormatter.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */